var getDate = function (val) {
    if (!val) return ""
    let date = new Date(val)
    return `${date.getFullYear()}年${parseInt(date.getMonth()) + 1}月${date.getDate()}`
}

template.helper("getDate", function (val) {
    return getDate(val)
})
var getDate2 = function (val, type) {
    if (!val) return ""
    let date = new Date(val)
    return `${date.getFullYear()}${type}${toDouble(parseInt(date.getMonth()) + 1)}${type}${toDouble(date.getDate())}`
}
var toDouble = function (num) {
    if (num > 10) {
        return num
    } else {
        return '0' + num
    }
}

template.helper("getDate2", function (val, type) {
    return getDate2(val, type)
})

var stringToArr = function (val) {
    return val.split(',')
}


template.helper("stringToArr", function (val) {
    return stringToArr(val)
})



var getCurHoverType = function (val) {
    return val
}

template.helper("getCurHoverType", function (val) {
    return getCurHoverType(val)
})
